<?php
namespace app\zhonghang\controller;
use think\Db;
use think\Controller;
use think\Request;
use think\Session;
use think\Cache;
use think\Cookie;
use think\Lang;

class About extends Controller{
 	public function _initialize(){

    }
	//空操作
	public function _empty(){
		header("HTTP/1.0 404 Not Found");
		$this->display('Public:404');
	}
//      公司简介
    public function index(){

        $chanpin =  DB::name('Goods_category')->where('parent_id',0)->where('is_show',1)->limit('1')->find();
        $erweima = DB::name('Website')->where('w_logo_status',1)->find();
        $list = DB::name('Website')->find();
        $lisst = Lang::get('dbcp');
        $gywmtp=DB::name('Config')->where('name','gywmtp')->value('value');
        $this->assign('gywmtp',$gywmtp);
        $this->assign('lisst',$lisst);
        $this->assign('list',$list);
        $this->assign('erweima',$erweima);
        $this->assign('chanpin',$chanpin);
        return $this->fetch('about/ab');
    }

    public function hezuo(){
 	    $hezuo = DB::name('app_config')->where('key','hezuo')->value('value');
 	    $this->assign('hezuo',$hezuo);
 	    return $this->fetch('feile/business_cooperation');
    }

    /**
     * 企业文化
     */
    public function structure()
    {
        $zifuji=Cookie::get('think_var');
        $chanpin =  DB::name('Goods_category')->where('parent_id',0)->where('is_show',1)->limit('1')->find();

        $erweima = DB::name('Website')->where('w_logo_status',1)->find();

        $lisst = Lang::get('dbcp');
        $gywmtp=DB::name('Config')->where('name','gywmtp')->value('value');
        $this->assign('gywmtp',$gywmtp);
        $this->assign('lisst',$lisst);
        $this->assign('erweima',$erweima);
        $this->assign('chanpin',$chanpin);
//        dump($xxl);
        if($zifuji=='zh-cn'){
            $lists = DB::name('Website')->where('w_id','1')->value('w_wenhua');
            $lists=htmlspecialchars_decode($lists);
        }elseif($zifuji=='en-us'){
            $lists = DB::name('Website_us')->where('w_id','1')->value('w_wenhua');
            $lists=htmlspecialchars_decode($lists);
        }else{
            $lists = DB::name('Website_jp')->where('w_id','1')->value('w_wenhua');
            $lists=htmlspecialchars_decode($lists);
        }

//        dump($lists);die();
        $this->assign('lists',$lists);
//        dump($lists);
        $list = DB::name('Website')->find();
        $this->assign('list',$list);
        return $this->fetch();
    }

}